import Service from '../../core/baseService';

export default class SearchHistoryService extends Service {
  constructor(ctx) {
    super(ctx);
    this.model = this.ctx.sassmodel.SearchHistory;
  }


  async list(where, attributes) {
    const result: any = await this.model
      .findAll({
        where,
        offset: 0,
        limit: 20,
        order: [['id', 'DESC']],
        attributes
      });
    return result;
  }

}
